package ${package.Entity};

import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotEmpty;

/**
* @author vvboy
*/
@Data
@NoArgsConstructor
public class ${entity}{

<#list table.fields as field>
    <#if field.propertyType=="String">
        <#if field.comment != "">
    @NotEmpty(message = "必须传入${field.comment}")
        <#else>
    @NotEmpty(message = "必须传入${field.propertyName}")
        </#if>
        <#if field.comment != "">
    @Size(max = 50, message = "${field.comment}不能超过50字符")
        <#else>
    @Size(max = 50, message = "${field.propertyName}不能超过50字符")
        </#if>
    </#if>
    private ${field.propertyType} ${field.propertyName};

</#list>

}
